package com.llb666.java.proxy.staticproxy;

/**
 * 代理角色 婚庆
 */
public class WeddingCompany implements Marry{

    private Marry target;

    public WeddingCompany () {
    }

    public WeddingCompany (Marry target) {
        this.target = target;
    }

    @Override
    public void happyMarry() {
        before();
        this.target.happyMarry ();
        after();
    }

    private void before () {
        System.out.println ("结婚之前，布置现场");
    }
    private void after () {
        System.out.println ("结婚之后，收尾款");
    }

    public static void main(String[] args) {
        WeddingCompany weddingCompany = new WeddingCompany (new XiaoWang());
        weddingCompany.happyMarry ();
    }
}
